<template>
	<div>
		<el-table :data="tableData" style="width: 100%">
			<el-table-column prop="time" label="时间">
				<template #default="scope">
					<div class="pt-10px pb-10px flex items-center">
						<span class="text-[#000000] text-[14px] font-[400]">{{ scope.row.time }}</span>
					</div>
				</template>
			</el-table-column>
			<el-table-column prop="coin" label="币种">
				<template #default="scope">
					<div class="pt-10px pb-10px flex items-center">
						<img :src="scope.row.icon" class="w-20px h-20px">
						<p class="ml-10px">{{ scope.row.coin }}</p>
					</div>
				</template>
			</el-table-column>
			<el-table-column prop="tag" label="标签">
			</el-table-column>
			<el-table-column prop="methods" label="类型">
			</el-table-column>
			<el-table-column prop="product" label="产品名称">
			</el-table-column>
			<el-table-column prop="sum" label="金额">
				<template #default="scope">
					<div :class="{'text-#F34E5F':scope.row.sum < 0, 'text-#07B175': scope.row.sum > 0 }">
						{{ scope.row.sum }} USDT
					</div>
				</template>
			</el-table-column>
			<el-table-column prop="balance" label="余额">
			</el-table-column>
			<el-table-column  label="操作" align="right">
				<template #default="scope">
					<div class="pt-10px pb-10px flex items-center justify-end">
						<p class="text-#F6AC57 cursor-pointer"
						@click="manageDetailShow = true">详情</p>
					</div>
				</template>
			</el-table-column>
		</el-table>
	</div>
	<ManageDetail :is-show="manageDetailShow" @close="closeManageDetail"></ManageDetail>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import ManageDetail from '../pop/ManageDetail.vue';
const tableData = ref<any[]>([
	{
		time: '2025-02-02 12:25:25',
		icon:'/purchase/btc.svg',
		coin: 'BTC',
		tag:'理财收益',
		methods:'理财产品',
		product:'理财T0',
		sum:'-5',
		balance:'899.00'
	},
	{
		time: '2025-02-02 12:25:25',
		icon:'/purchase/btc.svg',
		coin: 'BTC',
		tag:'理财收益',
		methods:'理财产品',
		product:'理财T0',
		sum:'-5',
		balance:'899.00'
	},
	{
		time: '2025-02-02 12:25:25',
		icon:'/purchase/btc.svg',
		coin: 'BTC',
		tag:'理财收益',
		methods:'理财产品',
		product:'理财T0',
		sum:'-5',
		balance:'899.00'
	}
])

const manageDetailShow = ref<boolean>(false);

const closeManageDetail = (val:any) => {
	manageDetailShow.value = val;
}
</script>

